﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Data.SqlTypes;

namespace WingtipToys
{
    public partial class Retreats : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            GridView GridView1 = new GridView();
            string strSQLconnection = "Data Source=dbServer;Initial Catalog=testDB;Integrated Security=True";
            SqlConnection sqlConnection = new SqlConnection(strSQLconnection);
            SqlCommand sqlCommand = new SqlCommand("SELECT * FROM dbo.Retreat", sqlConnection);
            sqlConnection.Open();

            SqlDataReader reader = sqlCommand.ExecuteReader();

            GridView1.DataSource = reader;
            GridView1.DataBind();
        }

    }
}